package com.xmu.makerspace.controller;

import com.xmu.makerspace.model.Team.TeamListVO;
import com.xmu.makerspace.model.Team.TeamMore;
import com.xmu.makerspace.service.TeamManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/TeamManagement")
public class TeamManagerControllor {
    @Autowired
    TeamManagementService teamManagementService;
    @CrossOrigin
    @RequestMapping("/getTeamList")
    public TeamListVO getTeamList(int page)
    {
        return  teamManagementService.GetTeamList(page);
    }
    @RequestMapping("/getTeamMore")
    public TeamMore getTeamMore(int team_id)
    {
        return teamManagementService.getTeamDetail(team_id);
    }
}
